import { ITodoData } from "./js/typing"

export default class TodoTemplate {
    todoView(ITodoData: ITodoData): string {
        const { complete, content, id } = ITodoData
        return `<li style="text-decoration:  ${complete ? 'line-through' : 'none'}" id="li-${id}">
            <input type="checkbox"  ${complete ? 'checked' : ''}  data-id=${id}>
            <span>${content}</span>
            <button data-id=${id}>删除</button>
        </li>`
    }


}